B19 - Knapsack 2
提出
code: python
n, w = map(int, input().split())
# dpij := i 個までで、重さが j までの価値の最大 dp =[0 * (w+1) for _ in range(n+1)] for i in range(1, n+1):
for j in range(1, w+1):
解答
code: python
n, w = map(int, input().split())
# dpij := i 個までで、価値が j までの重さの最小 dp = [10 ** 15 * 100001 for _ in range(n+1)] for i in range(1, n+1):
for j in range(100001):
if j < value:
if j >= value:
ans = 0
for value in range(100001):
ans = value
print(ans)